//package org.sbbs.base.tenant.cfg;
//
//import org.sbbs.base.jpa.dao.ExpandRepoFactoryBean;
//import org.sbbs.base.tenant.tenancy.SbbsTenantIdInterceptor;
//import org.springframework.context.annotation.Configuration;
//import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
//import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
//import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
//
//@EnableJpaRepositories(basePackages = "org.sbbs", repositoryFactoryBeanClass = ExpandRepoFactoryBean.class)
//@Configuration
//public class WebConfig implements WebMvcConfigurer {
//
//    private final SbbsTenantIdInterceptor tenantIdInterceptor;
//
////    @Primary
//    public WebConfig(SbbsTenantIdInterceptor sbbsTenantIdInterceptor) {
//        this.tenantIdInterceptor = sbbsTenantIdInterceptor;
//    }
//
//    @Override
//    public void addInterceptors(InterceptorRegistry registry) {
//        registry.addInterceptor(tenantIdInterceptor);
//        WebMvcConfigurer.super.addInterceptors(registry);
//    }
//}
